using System;
using System.Collections.Generic;
namespace NeuralNetwork
{
	public class Function
	{
		double threshold;
		public double logisticFunction (List<Input> inputs)
		{
			double sumWeightsAndData = 0;
			
				foreach (Input item in inputs) {
				sumWeightsAndData += item.data * item.weight;
			}
			//sigmoid function
			double y = 1 / (1 + System.Math.Exp (-(threshold*sumWeightsAndData)));
			return y;
		}
		public Function (double threshold)
		{
			this.threshold = threshold;
		}
	}
	
	
}

